home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE03 / INTERNAL / PASCAL.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-06-09  |  669 b   |  27 lines

  1. program DateProg;
  2.  
  3. uses WinProcs, WinTypes;
  4.  
  5. procedure DateSelSetCaption (Caption: PChar);
  6. far; external 'DATESEL' index 1;
  7.  
  8. procedure DateSelSetHelpInfo (HelpFile: PChar; HelpContext: LongInt);
  9. far; external 'DATESEL' index 2;
  10.  
  11. function DateSelDialog (var TheDate: Integer): Bool;
  12. far; external 'DATESEL' index 3;
  13.  
  14. var
  15.     i: Integer;
  16.     buff: array [0..127] of Char;
  17. begin
  18.     { Let's have a custom Caption }
  19.     DateSelSetCaption ('Calling Delphi from Vanilla Pascal');
  20.  
  21.     lstrcpy (buff, 'You made no choice');
  22.     if DateSelDialog (i) then wvsprintf (buff, 'You chose %d !', i);
  23.     MessageBox (0, buff, 'Pascal Caller', mb_ok);
  24. end.
  25.  
  26.  
  27.